@extends('layout.index')
@section('title','后台用户添加')

@section('content')
<div class="row">
    <div class="col-lg-8">
        <h1 class="page-header">用户添加</h1>
    </div>
    <!-- /.col-lg-12 -->
</div>

<div class="row">
	
    <div class="col-lg-8 ">
    	<div class="panel panel-default">						<div class="panel-heading">	
    			<!-- 显示内存中的错误信息 -->
    			<!-- @if(session('error'))
    			<div class="alert alert-danger alert-dismissable">
                    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
                    {{session('error')}}
                </div>
                @endif -->

                @if (count($errors) > 0)
				    <div class="alert alert-danger">
				        <ul>
				            @foreach ($errors->all() as $error)
				                <li>{{ $error }}</li>
				            @endforeach
				        </ul>
				    </div>
				@endif
    		</div>		

    		<div class="row">
    		<div class="col-lg-2"></div>
    			  <div class="col-lg-8 ">
    			<br>
			<form role="form" action="{{url('/admin/user/insert')}}" method="post" enctype="multipart/form-data">
			    <div class="form-group">
			        <label>用户名</label>
			        <input type="text" name="username" value="{{old('username')}}" class="form-control">
			    </div>
			    <div class="form-group">
			        <label>密码</label>
			        <input type="password" name="password"   value="{{old('password')}}" class="form-control">
			    </div>
			      <div class="form-group">
			        <label>确认密码</label>
			        <input type="password" name="rpwd" value="{{old('rpwd')}}" class="form-control">
			    </div>
			     <div class="form-group">
			        <label>邮箱</label>
			        <input type="text" name="email" value="{{old('email')}}" class="form-control">
			    </div>
			    <div class="form-group">
			        <label>手机号</label>
			        <input type="text" name="phone" value="{{old('phone')}}"  class="form-control">
			    </div>

			    <div class="form-group">
			        <label>头像</label>
			        <input type="file" name="pic">
			    </div>
			    {{csrf_field()}}
			    <button class="btn btn-primary " type="submit">添加</button>
			    <button class="btn btn-warning " type="reset">重置</button>
			</form>
			</div>
			</div>
			<br>
	</div>
   </div>
</div>
@endsection